home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / lantimes / 90_03 / netbios.h < prev    next >
Text File  |  1989-12-11  |  2KB  |  85 lines

  1. /*-------------------------------------------------------------------------*
  2. /* netbios.h -- definitions for netbios programs
  3.  *
  4.  * T. Nolan 11/15/89
  5.  *-------------------------------------------------------------------------*/
  6.  
  7. #ifndef MAXPATH
  8.     #define MAXPATH 80
  9. #endif
  10.  
  11. #define NODE_NAME_LEN 16
  12.  
  13. typedef struct
  14. {
  15.     unsigned char command;
  16.     unsigned char retcode;
  17.     unsigned char lsn;
  18.     unsigned char num;
  19.  
  20.     char far *buffer;
  21.  
  22.     unsigned int length;
  23.  
  24.     char callname[NODE_NAME_LEN];
  25.     char name[NODE_NAME_LEN];
  26.  
  27.     unsigned char rto;
  28.     unsigned char sto;
  29.  
  30.     void (interrupt far *post)();
  31.  
  32.     unsigned char lana;
  33.     unsigned char cmdcplt;
  34.  
  35.     char reserved[16];
  36. } NCB;
  37.  
  38. #define NB_INT  0x5c
  39.  
  40. #define NB_RESET                0x32
  41. #define NB_CANCEL               0x35
  42. #define NB_ADAPTER_STATUS       0x33
  43. #define NB_UNLINK               0x70
  44. #define NB_TRACE                0x79
  45. #define NB_ADD_NAME             0x30
  46. #define NB_ADD_GROUP_NAME       0x36
  47. #define NB_DELETE_NAME          0x31
  48. #define NB_FIND_NAME            0x78
  49. #define NB_CALL                 0x10
  50. #define NB_LISTEN               0x11
  51. #define NB_HANGUP               0x12
  52. #define NB_SEND                 0x14
  53. #define NB_SEND_NO_ACK          0x71
  54. #define NB_CHAIN_SEND           0x17
  55. #define NB_CHAIN_SEND_NO_ACK    0x72
  56. #define NB_RECEIVE              0x15
  57. #define NB_RECEIVE_ANY          0x16
  58. #define NB_SESSION_STATUS       0x34
  59. #define NB_SEND_DATAGRAM        0x20
  60. #define NB_RECEIVE_DATAGRAM     0x21
  61. #define NB_SEND_BDATAGRAM       0x22
  62. #define NB_RECEIVE_BDATAGRAM    0x23
  63. #define NB_INVALID              0x7f
  64. #define NO_WAIT                 0x80
  65.  
  66. #ifndef NB
  67.     extern int isnodename(char *str);
  68.     extern void clear_ncb(NCB *ncb_ptr);
  69.     extern int nb_request(int cmd, NCB *ncb_ptr);
  70.     extern int nb_cancel(NCB *ncb_ptr);
  71.     extern int reset(void);
  72.     extern int get_name(char *str);
  73.     extern int add_name(char *str);
  74.     extern int call(char *remote, char *local);
  75.     extern int listen(char *remote, char *local);
  76.     extern int send_datagram(char *node, void *buf, int len);
  77.     extern int send_brdcst_datagram(void *buf, int len);
  78.     extern int recv_datagram(void *buf, int len, char *sender);
  79.     extern int nw_recv_datagram(void *buf, int len, NCB *ncb_ptr);
  80.     extern int nw_recv_brdcst_datagram(void *buf, int len, NCB *ncb_ptr);
  81.     extern int send(int lsn, void *buf, int len);
  82.     extern int receive(int lsn, void *buf, int len);
  83.     extern int hangup(int lsn);
  84. #endif
  85.